package com.heima.article.controller.v1;

import com.heima.article.service.ApCollectionService;
import com.heima.common.dtos.ResponseResult;
import com.heima.model.behavior.dtos.CollectionBehaviorDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
public class ApCollectionController {

    @Autowired
    ApCollectionService collectionService;

    /**
     * 收藏行为
     * @param dto
     * @return
     */
 @PostMapping("/api/v1/collection_behavior")
   public ResponseResult  collectionBehavior(@Valid @RequestBody CollectionBehaviorDto dto){
     collectionService.collectionBehavior(dto);
     return  ResponseResult.ok();
 }

}
